package com.hj.controller;

import com.hj.service.WorldDocumentService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author hj
 */
@RestController
@RequestMapping("/worldDocument")
public class WorldDocumentController {


    private final WorldDocumentService worldDocumentService;

    /**
     * 库名
     */
    @Value(value = "${dataName}")
    private String dataName;

    public WorldDocumentController(WorldDocumentService worldDocumentService) {
        this.worldDocumentService = worldDocumentService;
    }

    @RequestMapping("/demo")
    public String generate() {
        worldDocumentService.getTableInfo(dataName);
        return "成功";
    }


}
